Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Create Radio Button Component #586

Merged
merged 9 commits into from
Dec 3, 2024

Conversation

TimRoe
Copy link
Contributor

@TimRoe TimRoe commented Nov 5, 2024

Description of Change

Created the Radio button component. Given the extreme similarities to Checkbox/Checkbox group, this involved pulling out a shared component (CheckboxRadio) to have shared code under the hood and basically just conditionally swap the icon. Then Radio button itself was formed off modifying Checkbox group so only one would be selected.

Testing Packages

Screenshots/Video

iOS: Not recorded in Storybook because ExpoGo app was updated and, unlike Android, there's no way to install an older version so it's out of commission until we update dependencies to the newer SDK.

Android:

Screen_Recording_20241122-135343_Expo.Go.mp4

Web:

Screen.Recording.2024-11-22.at.1.17.27.PM.mov

Flagship (iOS):

RPReplay_Final1732303336.MP4

Flagship (Android):

Screen_Recording_20241122-133931_VA.mp4

Testing

Smoke tested nothing appeared to break with existing Checkbox/Checkbox group with the transition to shared underlying component with Radio.

Validated Radio button appeared to be behaving as expected in Web/iOS/Android (including iOS/Android in flagship). One bug noted with VoiceOver (iOS) only where it intermittently (more often than not, but not always) when activating a different radio will read out that it is unselected then immediately read out again that it is selected; bug #596 created.

  • Tested on iOS
  • Tested on Android
  • Tested on Web

PR Checklist

Code reviewer validation:

  • General
    • PR is linked to ticket(s)
    • PR has changelog label applied if it's to be included in the changelog
    • Acceptance criteria:
      • All satisfied or
      • Documented reason for not being performed or
      • Split to separate ticket and ticket is linked by relevant AC(s)
    • Above PR sections adequately filled out
    • If any breaking changes, in accordance with the pre-1.0.0 versioning guidelines: a CU ticket has been created for the VA Mobile App detailing necessary adjustments with the package version that will be published by this ticket
  • Code
    • Tests are included if appropriate (or split to separate ticket)
    • New functions have proper TSDoc annotations

Publish

If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:

@TimRoe TimRoe marked this pull request as ready for review November 22, 2024 18:21
@TimRoe TimRoe requested a review from a team as a code owner November 22, 2024 18:21
Copy link
Contributor

@narin narin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work refactoring for reuse between Checkbox and Radio.

@TimRoe TimRoe merged commit 7f1ed6b into main Dec 3, 2024
4 of 11 checks passed
@TimRoe TimRoe deleted the feature/521-CreateRadioButtonComponent branch December 3, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants